package team.yidong.fenda.service;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import team.yidong.fenda.entity.Hospital;

import javax.persistence.criteria.CriteriaBuilder;
import java.util.List;


/**
 * Created by xuanlong on 2017/10/7.
 */
@Service
public interface HospitalService {
    JSONObject findHospitalCriteria(Integer id, String hospitalName, Double proportion, String tixianTime, Integer page, Integer page_size);

    Hospital findHospitalById(Integer id);

    Hospital findByName(String hospitalName);

    String saveHospital(String hospitalName, Double proportion, String userName, String password, String departmentName, String tixianTime, String jgxxgl, String tp, String bmgl, String jgflgl, String jgjjgl, String zjxxgl, String zjdtmx, String yyslgl, String xxgl, String lscx, String wtgl, String hmd, String dd, String yhhhgl, String ztjz);


    JSONArray findAll();

    List<Hospital> findByImgId(Integer imgId);

    void deleteHospital(Iterable<Hospital> hospitalIterable);

    void updateProportion(Integer hospitalId, Integer tixianTime);

    void update(Integer hospitalId, String updateInfo);

    String findHospitalNameById(Integer hospitalId);

    JSONArray findSysUserPermission(Integer userId);

    JSONArray findAllSysUser();

    JSONArray findAllSysUserPermission(String hospitalName, String sysUserName);

    JSONArray findAllHospitalAdmin();

    JSONArray findUserRestPermission(Integer userId);

    void addSysUserPermission(Integer userId, Integer permissionId);

    void deleteSysUserPermission(Integer roleId, Integer permissionId);
}
